package com.ibiaoke.boss.controller;

import com.ibiaoke.common.base.Page;
import com.ibiaoke.common.consts.CommonConsts;
import com.ibiaoke.common.response.Res;
import com.ibiaoke.system.entity.Floor;
import com.ibiaoke.system.service.FloorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by biaoke on 2017/6/22.
 */
@Controller
public class WxFloorController {
    @Autowired
    private FloorService floorService;


    /**
     * 查询楼层列表
     *
     *
     * @param shopId
     * @param page
     * @return
     */
    @ResponseBody
    @RequestMapping("/listFloor")
    public Res listFloor(Integer position, Integer shopId, Page page) {
        List<Floor> floors = floorService.listFloor(position, CommonConsts.NO, shopId, page);
        return Res.create().addResponse("floors", floors);
    }
}
